package edu.ccut.saturn.studio.naviagtor.actions.model;

import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.PlatformUI;

import edu.ccut.saturn.studio.Activator;
import edu.ccut.saturn.studio.Images;
import edu.ccut.saturn.studio.core.util.action.SaturnAction;
import edu.ccut.saturn.studio.core.util.eclipse.Messages;
import edu.ccut.saturn.studio.example.SampleWizard;

public class CreateSaturnSampleAction1 extends SaturnAction {
	public CreateSaturnSampleAction1() {
		setText(Messages.getString("CreateSaturnSampleAction1.eaxmpleName"));  //$NON-NLS-1$
		setImageDescriptor(Activator
				.getImageDescriptor(Images.LOGIC_FOLDER_ICON));
	}

	public void run() {
		SampleWizard newSampleWizard = new SampleWizard();
		newSampleWizard.setSelection(super.getStructuredSelection());
		newSampleWizard.setWorkbench(PlatformUI.getWorkbench());
		WizardDialog wizarddialog = new WizardDialog(PlatformUI.getWorkbench()
				.getActiveWorkbenchWindow().getShell(), newSampleWizard);
		wizarddialog.open();
	}
}
